package Protocol;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

/**
 * Returnobject welke verstuurd wordt naar de client
 * Class is Serializable omdat deze met een stream verzonden en ontvangen wordt
 * @author Michael Stevens
 * @since 03-05-2012
 */
public class ReturnObject implements Serializable{
    private ArrayList<ArrayList> rijen;
    private ArrayList<String> kolommen;
    private String message;
    private int id;
    private String ok = "ok";
    private String error = "error";
    
    public ReturnObject(){
        rijen = new ArrayList<ArrayList>();
        kolommen = new ArrayList<String>();        
    }
    
    public void addRows(ArrayList<String> a){
        getRijen().add(a);
    }
    
    public void setColumns(ArrayList<String> s){
        kolommen = s;
    }

    /**
     * @return the message
     */
    public String getMessage() {
        return message;
    }

    /**
     * @param message the message to set
     */
    public void setMessage(String message) {
        this.message = message;
    }

    /**
     * @return the ok
     */
    public String getOk() {
        return ok;
    }

    /**
     * @return the error
     */
    public String getError() {
        return error;
    }

    /**
     * @return the rijen
     */
    public ArrayList<ArrayList> getRijen() {
        return rijen;
    }

    /**
     * @return the kolommen
     */
    public ArrayList<String> getKolommen() {
        return kolommen;
    }
    
    /**
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }
    
    
    
    
    
}
